/**
 * 将json对象转化成js字符串
 * @param {Object} json
 */
insertEscape = function(json) {
	var str = "";
	for (var key in json) {
		if (typeof json[key] == 'object') {
			if (isArray(json[key])) {
				var arr = json[key];
				var arrStr = ""
				arrStr += '\\"' + key + '\\":[';
				for (var i = 0; i < arr.length; i++) {
					if (typeof arr[i] == 'object') {

						arrStr += insertEscape(arr[i]);
					} else {
						arrStr += '\\"'+arr[i]+'\\"';
					}
					if (i < arr.length - 1) {
						arrStr += ','
					}
				}
				arrStr += ']';
				console.log(arrStr)
				str += arrStr+',';
			} else {
				str += '\\"' + key + '\\":' + insertEscape(json[key]) + ',';
			}

		} else {
			str += '\\"' + key + '\\":' + '\\"' + json[key] + '\\",';
		}
	}
	str = str.substring(0, str.length - 1);
	str = "{" + str + "}";
	return str;
}
/**
 * 判断对象是不是数组
 * @param {Object} param
 */
isArray = function(param) {
	if (isEmpty(param))
		return false;
	if (typeof param != 'object' || typeof param.length == 'undefined' || typeof param.length == undefined)
		return false;
	return true;
}
/**
 * 判断对象是否为空
 * @param {Object} param
 */
isEmpty = function(param) {
	if (typeof param == 'undefined' || typeof param == undefined || param == 'undefined' || param == undefined || param == null || param == "") {
		return true;
	}
	return false;
}